package com.wty.design.structural.decorator.v2;

/**
 * @Author wangtengyu
 * @Create 2018-09-19-10:14
 * 装饰者基类
 */
public class AbstractDecorator extends AbstractBatterCake {
    private AbstractBatterCake abstractBatterCake;

    public AbstractDecorator(AbstractBatterCake abstractBatterCake){
        this.abstractBatterCake=abstractBatterCake;
    }

    @Override
    protected  String getDescription() {
        return abstractBatterCake.getDescription();
    }

    @Override
    protected int cost() {
        return abstractBatterCake.cost();
    }
}
